package com.wxp.controller.mall;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wxp.controller.BaseController;
import com.wxp.service.ConstructionService;
import com.wxp.util.IData;

@Controller
@RequestMapping(value = "/construction")
public class ConstructionSearchController extends BaseController {
	
	@Autowired
	private ConstructionService constructionService;

	@RequestMapping(value = "/fetchSummary")
	@ResponseBody
	public Object fetchSummary() throws Exception {
		IData pd = IData.getInstance(request);
		List<IData> datas = constructionService.fetchSummary(pd);
		return datas;
	}
	
	@RequestMapping(value = "/fetchWorkTrend")
	@ResponseBody
	public Object fetchWorkTrend() throws Exception {
		IData pd = IData.getInstance(request);
		List<IData> datas = constructionService.fetchWorkTrend(pd);
		return datas;
	}
	
	@RequestMapping(value = "/fetchRateWorkGroupByProject")
	@ResponseBody
	public Object fetchRateWorkGroupByProject() throws Exception {
		IData pd = IData.getInstance(request);
		List<IData> datas = constructionService.fetchRateWorkGroupByProject(pd);
		return datas;
	}
}
